/*
 * acm1619.c
 *
 *  Created on: 28 Mar 2010
 *      Author: xuxu
 */

#include<stdio.h>
#include<stdlib.h>

double arrange(int n)
{
	double result;
	int i;
	result=1;
	for(i=1;i<=n;i++)
		result*=i;
	return result;
}

double combin(int n,int c)
{
	double result;
	int i;
	int t_n,t_c;
	t_n=n;
	t_c=c;
	result=1;
	for(i=0;i<c;i++,t_n--)
		result*=t_n;
	for(i=0;i<c;i++,t_c--)
		result/=t_c;
	return result;
}

int main()
{
	int m,n;
	double num[110];
	int i;
	double rate;
	double result_fenzi,result_fenmu;
	memset(num,0,sizeof(num));
	num[1]=0;
	num[2]=1;
	for(i=3;i<=100;i++)
		num[i]=(i-1)*(num[i-1]+num[i-2]);
	while(scanf("%d%d",&n,&m)!=EOF)
	{
		if(n==m)
		{
			result_fenmu=arrange(n);
			result_fenzi=1;
		}
		else
		{
			result_fenmu=arrange(n);
			result_fenzi=combin(n,n-m)*num[n-m];
		}
		rate=(double)result_fenzi/(double)result_fenmu;
		printf("%.8lf\n",rate);
	}
	return 0;
}
